public class ThreadOrnek {
	public static void main(String[] args) throws InterruptedException {
		System.out.println("Merhaba");
		Thread thread = new Thread(new Runnable() {
			@Override
			public void run() {
				try {
					Thread.sleep(2000);
				} catch (InterruptedException e) {
				}
				System.out.println("Ali");

			}
		});

		thread.start();
		thread.join();
		System.out.println("naber");
	}
}
